<?php
$config = [
    'id' => 'console',
    'basePath' => SYS_ROOT,
    'vendorPath' => YII_ROOT,
    'bootstrap' => ['log'],
    'modules' => [],
    'extensions' => [],
    'controllerNamespace' => 'app\commands',
    'components' => [
        'log' => require(__DIR__ . '/log.php'),
        'cache_db_schema' => require(__DIR__ . '/cache_db_schema.php'),
        'cache' => require(__DIR__ . '/cache.php'),
        'setting' => [
            'class' => 'app\models\Setting'
        ],
    ],
];
if (YII_ENV_DEV && is_dir(Yii::getAlias('yii/gii'))) {
    $config['bootstrap'][] = 'gii';
    $config['modules']['gii'] = [
        'class' => 'yii\gii\Module',
        'allowedIPs' => ['*']
    ];
}

if (file_exists(__DIR__ . '/db.php')) {
    $config['components']['db'] = require(__DIR__ . '/db.php');
}
return $config;